package com.yyh.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author yangyueheng
 * @since 2020-06-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Modules对象", description="")
public class Modules implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "模块编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "模块名称")
    @JsonProperty("title")
    private String name;

    @ApiModelProperty(value = "父模块编号")
    private Integer parentId;

    @ApiModelProperty(value = "模块路径")
    private String path;

    @ApiModelProperty(value = "权重")
    private Double weight;

	@TableField(exist = false)
	private boolean checked;
	
	@TableField(exist = false)
	private List<Modules> children;
}
